﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TimerJobServer.Common
{
    public enum QuarzJobType
    {
        Dll,
        //CS,
        Exe,
        HttpGet,
        HttpPost
    }

    /// <summary>
    /// 工作信息配置
    /// </summary>
    [Serializable]
    public class QuarzJobInfo
    {
        /// <summary>
        /// 设置ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        public string Name { set; get; }

        /// Cron表达式
        /// </summary>
        public string Cron { set; get; }

        /// <summary>
        /// 任务类型
        /// </summary>
        public QuarzJobType JobType { set; get; }

        /// <summary>
        /// 执行文件完整路径
        /// </summary>
        public string FullPath { set; get; }

        /// <summary>
        /// 类完整名称
        /// </summary>
        public string ClassFullName { set; get; }

        public string SrcCodeFilePath { set; get; }

        /// <summary>
        /// 要执行的方法名称
        /// </summary>
        public string MethodName { set; get; }

        /// <summary>
        /// 是否使用
        /// </summary>
        public bool Enable { set; get; }

        /// <summary>
        /// exe程序执行的参数
        /// </summary>
        public string Args { get; set; }

        /// <summary>
        /// HttpUrl
        /// </summary>
        public string HttpURL { get; set; }

        /// <summary>
        /// HttpPost请求数据
        /// </summary>
        public string HttpPostDate { get; set; }

        /// <summary>
        /// HTTP 头消息
        /// </summary>
        public List<HttpHeader> HttpHeaderDic { get; set; }

}

    /// <summary>
    /// Http头对象
    /// </summary>
    [Serializable]
    public class HttpHeader
    {
        public string Key { get; set; }
        public string Value { get; set; }
    }
}
